#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include "opencv2/core/core.hpp"
#include <iostream>
using namespace cv;
int main()
{
	Mat image = cv::imread("lena_16g_lin.png",IMREAD_ANYDEPTH);

    if (!image.data) {
        std::cout << "Image file not found\n";
        return 1;
    }

	Mat pic16bit = image;
	printf("a:");
	for (int r = 0; r < pic16bit.rows; r++)
	{
		for (int c = 0; c < pic16bit.cols; c++)
		{
			printf("  %d", pic16bit.at<unsigned short>(r, c));
			// printf("  %04x", pic16bit.at<unsigned short>(r, c));
		}
	}
	printf("\n");
	return 0;
}